<?php
/* ------------------------------------------------------------------------
 * AION-KOREA Admin Control Panel
 *
 * @version 1.0
 * @author Taro6222 (AION-KOREA Admin CP main Developer)
 * @link http://redmine.aionkorea.org/projects/ak-admin-cp
 * @license http://creativecommons.org/licenses/by-nc-sa/3.0/deed.ko
 * @APM http://www.apachefriends.org/en/xampp.html
 *
------------------------------------------------------------------------ */

class adoAion
{
	/**
	 * Stores the instance of this class.
	 *
	 * @var -
	 */
	private static $instance = null;


	public static function getLevel($EXP)
	{
		if ( !$EXP ) {
			return false;
		}
		if ($EXP > 0 && $EXP <= 650) {$level = 1;}
		else if ($EXP < 2567) {$level = 2;}
		else if ($EXP < 6797) {$level = 3;}
		else if ($EXP < 15490) {$level = 4;}
		else if ($EXP < 30073) {$level = 5;}
		else if ($EXP < 52958) {$level = 6;}
		else if ($EXP < 87894) {$level = 7;}
		else if ($EXP < 140329) {$level = 8;}
		else if ($EXP < 213454) {$level = 9;}
		else if ($EXP < 307558) {$level = 10;}
		else if ($EXP < 438553) {$level = 11;}
		else if ($EXP < 608161) {$level = 12;}
		else if ($EXP < 825336) {$level = 13;}
		else if ($EXP < 1091985) {$level = 14;}
		else if ($EXP < 1418170) {$level = 15;}
		else if ($EXP < 1810467) {$level = 16;}
		else if ($EXP < 2332547) {$level = 17;}
		else if ($EXP < 3002260) {$level = 18;}
		else if ($EXP < 3820082) {$level = 19;}
		else if ($EXP < 4820229) {$level = 20;}
		else if ($EXP < 6055323) {$level = 21;}
		else if ($EXP < 7665200) {$level = 22;}
		else if ($EXP < 9667124) {$level = 23;}
		else if ($EXP < 12015782) {$level = 24;}
		else if ($EXP < 14702523) {$level = 25;}
		else if ($EXP < 17819939) {$level = 26;}
		else if ($EXP < 21422200) {$level = 27;}
		else if ($EXP < 25434736) {$level = 28;}
		else if ($EXP < 30111208) {$level = 29;}
		else if ($EXP < 35939440) {$level = 30;}
		else if ($EXP < 42747682) {$level = 31;}
		else if ($EXP < 50838806) {$level = 32;}
		else if ($EXP < 60528213) {$level = 33;}
		else if ($EXP < 73197342) {$level = 34;}
		else if ($EXP < 89321807) {$level = 35;}
		else if ($EXP < 109063829) {$level = 36;}
		else if ($EXP < 135085670) {$level = 37;}
		else if ($EXP < 165021833) {$level = 38;}
		else if ($EXP < 201169803) {$level = 39;}
		else if ($EXP < 243343723) {$level = 40;}
		else if ($EXP < 292699203) {$level = 41;}
		else if ($EXP < 350659083) {$level = 42;}
		else if ($EXP < 415031452) {$level = 43;}
		else if ($EXP < 485413854) {$level = 44;}
		else if ($EXP < 559280864) {$level = 45;}
		else if ($EXP < 643809037) {$level = 46;}
		else if ($EXP < 741317548) {$level = 47;}
		else if ($EXP < 853743989) {$level = 48;}
		else if ($EXP < 982653882) {$level = 49;}
		else if ($EXP < 1128723910) {$level = 50;}
		else if ($EXP < 1274793938) {$level = 51;}
		else if ($EXP < 1452258716) {$level = 52;}
		else if ($EXP < 1656513717) {$level = 53;}
		else if ($EXP < 1892999481) {$level = 54;}
		else if ($EXP < 2164391835) {$level = 55;}
		else {$level = 55;}
		unset($EXP);
		return $level;
	}


	public static function getClass( $class )
	{
		if ( $class == 'WARRIOR' ) $ret = "전사";
		else if ( $class == 'GLADIATOR' ) $ret = "검성";
		else if ( $class == 'TEMPLAR' ) $ret = "수호성";
		else if ( $class == 'SCOUT' ) $ret = "정찰자";
		else if ( $class == 'ASSASSIN' ) $ret = "궁성";
		else if ( $class == 'RANGER' ) $ret = "살성";
		else if ( $class == 'MAGE' ) $ret = "법사";
		else if ( $class == 'SORCERER' ) $ret = "마도성";
		else if ( $class == 'SPIRIT_MASTER' ) $ret = "정령성";
		else if ( $class == 'PRIEST' ) $ret = "사제";
		else if ( $class == 'CLERIC' ) $ret = "치유성";
		else if ( $class == 'CHANTER' ) $ret = "호법성";
		else $ret = "-";
		return $ret;
	}


	public static function getWorldName( $id )
	{
		$worldName = array(
			'110010000' => '엘리시움',
			'110020000' => '카이시넬 주신전',
			'120010000' => '판데모니움',
			'120020000' => '마르쿠탄 주신전',
			'110070000' => '카이시넬 템페르 훈련소',
			'120080000' => '마르쿠탄 템페르 훈련소',
			'210010000' => '포에타',
			'210020000' => '엘테넨',
			'210030000' => '베르테론',
			'210040000' => '인테르디카',
			'210050000' => '잉기스온',
			'210060000' => '테오보모스',
			'210070000' => '카이시넬 템페르 훈련소',
			'220010000' => '이스할겐',
			'220020000' => '모르헤임',
			'220030000' => '알트가르드',
			'220040000' => '벨루스란',
			'220050000' => '브루스트호닌',
			'220070000' => '겔크마로스',
			'220080000' => '마르쿠탄 템페르 훈련소',
			'300010000' => 'IDAbPro',
			'300020000' => 'IDTest_Dungeon',
			'300030000' => '노흐사나 훈련소',
			'300040000' => '암흑의 포에타',
			'300050000' => '아스테리아의 심연',
			'300060000' => '유황 나무 둥지',
			'300070000' => '고대도시 루의 지하요새',
			'300080000' => '왼쪽 날개 그늘',
			'300090000' => '오른쪽 날개 그늘',
			'300100000' => '강철갈퀴 호',
			'300110000' => '드레드기온',
			'300120000' => '드키사스 지하요새',
			'300130000' => '라 미렌 지하요새',
			'300140000' => '크로탄 지하요새',
			'300150000' => '버려진 우다스 신전',
			'300160000' => '우다스 신전 지하',
			'300170000' => '파슈만디르 사원',
			'300190000' => '카스파 내부',
			'300200000' => '하라멜',
			'300210000' => '찬트라 드레드기온',
			'300220000' => '심연의 잔해',
			'300230000' => '악몽',
			'300240000' => '아투람 공중요새',
			'300250000' => '아라카',
			'300260000' => '라디스 숲',
			'300270000' => '도르겔 저택',
			'300280000' => '렌투스 전초기지',
			'300290000' => 'Test_MRT_IDZone',
			'300300000' => '제1 템페르 훈련소',
			'300310000' => '타메스',
			'300320000' => '제2 템페르 훈련소',
			'310010000' => '카람마티스',
			'310020000' => '카람마티스',
			'310030000' => '아에르디나',
			'310040000' => '게라나이아',
			'310050000' => '혁명단 비밀연구소',
			'310060000' => '암흑의 파편',
			'310070000' => '암흑의 파편',
			'310080000' => '엘리시움 지하 투기장',
			'310090000' => '인드라투 요새',
			'310100000' => '아조투란 요새',
			'310110000' => '테오보모스 비밀연구소',
			'310120000' => '카람마티스',
			'320010000' => '나르삿스',
			'320020000' => '나르삿스',
			'320030000' => '브레기룬',
			'320040000' => '니달베르',
			'320050000' => '아르카니스 공중신전 내부',
			'320060000' => '망각의 공간',
			'320070000' => '운명의 공간',
			'320080000' => '드라웁니르 동굴',
			'320090000' => '트리니엘 지하 투기장',
			'320100000' => '불의 신전',
			'320110000' => '알퀴미아 연구소',
			'320120000' => '침묵의 심판소 비밀감옥',
			'320130000' => '아드마 성채',
			'320140000' => '나르삿스',
			'330010010' => '불꽃의 혈맥',
			'400010000' => '에레슈란타',
			'510010000' => 'LF_Prison',
			'520010000' => 'DF_Prison',
			'600010000' => '실렌테라 회랑',
			'900020000' => 'TestBasic',
			'900030000' => 'Test_Server',
			'900100000' => 'Test_GiantMonster',
			'900110000' => 'Housing_barrack',
			'900120000' => 'Test_IDArena',
			'900130000' => '레기온 하우징',
			'900140000' => '고급개인 하우징',
			'990010110' => 'SOUTH RAKHAN',
		);
		return $worldName[$id];
	}
}
